﻿using Microsoft.Phone.Shell;
namespace Tfs.OnTheRoad.Commands
{
    /// <summary>
    /// Navigate to Settings Page
    /// </summary>
    public class NavigateToSettingsCommand : BaseCommand
    {     
        public override void Execute(object parameter)
        {
            //We remove the old Setting that might be eventually setted here
            if (PhoneApplicationService.Current.State.ContainsKey("SettingsSavedToShowHelpOrAbout"))
                PhoneApplicationService.Current.State.Remove("SettingsSavedToShowHelpOrAbout");
            NavigateTo("/Pages/SettingsPage.xaml");
        }
    }
}